/**
 * 烧瓶
 */
Flask = Widget.extend({
	ctor:function(parent){
		this._super();
		parent.addChild(this,30);
		this.init();
		this.setTag(TAG_FLASK);
	},
	init:function(){
		this.setCascadeOpacityEnabled(true);

		// 烧瓶1号（电阻丝少）
		var flask1 = new Button(this, 10, TAG_FLASK1, "#flask1.png", this.callback);
		flask1.setPosition(cc.p(550,440));
		//  烧瓶1号,玻璃管中的煤油
		var kerosene1 = new Button(flask1, 10, TAG_KEROSENE1, "#kerosene.png", this.callback);
		kerosene1.setPosition(cc.p(69,246));
		kerosene1.setAnchorPoint(0.5, 0);
		
		
		//  烧瓶2号（电阻丝多）
		var flask2 = new Button(this, 10, TAG_FLASK2, "#flask2.png", this.callback);
		flask2.setPosition(cc.p(730,440));
		//  烧瓶2号，玻璃管中的煤油
		var kerosene2 = new Button(flask2, 10, TAG_KEROSENE2, "#kerosene.png", this.callback);
		kerosene2.setPosition(cc.p(70,246));
		kerosene2.setAnchorPoint(0.5, 0);
		
		
		this.callNext = cc.callFunc(function(){
			gg.flow.next();
		}, this);
		this.callNext.retain();
	},
	callback:function (p){
		var action=gg.flow.flow.action;
		var func=cc.callFunc(this.actionDone,this);
		switch(p.getTag()){
		case TAG_FLASK1:

			break;
		case TAG_FLASK2:

			break;
		default:
			break;
		}
	},
	actionDone:function(p){
		var action=gg.flow.flow.action;
		switch(p.getTag()){
		case TAG_FLASK1:

			break;
		case TAG_FLASK2:

			break;
		default:
			break;
		}
		gg.flow.next();
	},
	onExit:function(){
		this._super();
		this.callNext.release();
	}
})